home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Extravaganza - Disc 4
/
Shareware Extravaganza - Over 25,000 Programs (The Ultimate Shareware Company)(Disc 4 of 4)(1993).iso
/
cad
/
quikcmd2.zip
/
FASTCALC.LSP
< prev
next >
Wrap
Text File
|
1990-10-23
|
5KB
|
128 lines
; FASTCALC.LSP
;
; QUICK COMMAND version 2.0
; FASTCALC.LSP is a module of QUICK COMMAND
; Copyright 1989, 1990 Dan Jincks
;
;
; This is SHAREWARE, it is NOT Public Domain software.
;
; This code or any part of this code may not be reproduced
; in any publication without prior written permission.
;
; Printed copy of this code or any part of this code may not
; be distributed without prior written permission.
;
; Printed copy may only be made for reference purposes by
; the end user.
;
;
; Dan Jincks
; Box 155A HCR 77
; Annapolis, MO 63620
;
;
;
; You are granted a limited license to use FASTCALC.LSP for a 30 day trial
; period. If you wish to continue using any or all of QUICK COMMAND after
; the trial period, you must become a registered user. As a registered
; user, you may use QUICK COMMAND on 1 workstation or terminal.
; Additional registrations must be bought for each additional workstation or
; terminal. To become a registered user, fill out the order form that can
; be printed out from ORDERQC.DOC .
;
;
; You may send copies of QUICK COMMAND to friends and associates if you abide
; by the following rules:
;
; 1. It may only be distributed in the original unmodified form.
; 2. All original files must be included.
; 3. No addition files may be added.
; 4. If other files will be on the same disk, QUICK COMMAND files must be in
; a library format such as ".ARC" called "QUICKCMD", or else be put alone
; in a subdirectory called "QUICKCMD".
; 5. You may not sell QUICK COMMAND or any part of it.
; 6. You are not allowed to charge more then $5 to cover the cost of copying
; and distribution.
; 7. You may not distribute any hard copy of the contents of QUICK COMMAND.
;
;
; These AutoLISP commands and functions are designed to save you time, and
; saving time means saving money. The registration fee is very modest
; compared to the savings, and much less expensive then typical third party
; AutoCAD software. Be sure to registar if you continue to use them.
;
;
; DAN
;
;
;
;
; AutoCAD and AutoLISP are registered trade marks of Autodesk Inc.
;
; ***************************************************************
;
; Begin FASTCALC.LSP
;
(defun C:CA ()(CA))
(defun CA (/ SCA SCB SCC SCF)
(prompt " Calculator !!! ")(terpri)
(prompt " ")(terpri)
(if (/= ANS nil)(progn
(prompt "Start with previous answer: ")(prin1 ANS)(prompt " ? ")
(initget "Yes No")
(setq SCB (getkword " Yes/No <No> "))))(terpri)
(if (or (= SCB "No")(= SCB nil))(progn
(initget (+ 1 2))
(setq ANS (getdist "Enter first number or distance: "))))
(setq SCF 0)
(while (/= SCF nil)(progn
(prompt " ")(terpri)
(prin1 ANS)
(initget "Add Subtract Multiply Divide SQuareroot + * - /")
(setq SCF
(getkword " Add/Subtract/Multiply/Divide/SQuareroot "))
(terpri)
(if (or (= SCF "Add")(= SCF "+"))(progn
(setq SCA ANS)(prin1 SCA)
(initget (+ 1 2))
(setq SCC (getdist " + ? "))(terpri)
(setq ANS (+ ANS SCC))(prin1 SCA)(prompt" + ")(prin1 SCC)(prompt" = ")
(prin1 ANS)(terpri)
)
)
(if (or (= SCF "Subtract")(= SCF "-"))(progn
(setq SCA ANS)(prin1 SCA)
(initget (+ 1 2))
(setq SCC (getdist " - ? "))(terpri)
(setq ANS (- ANS SCC))(prin1 SCA)(prompt" - ")(prin1 SCC)(prompt" = ")
(prin1 ANS)(terpri)
)
)
(if (or (= SCF "Multiply")(= SCF "*"))(progn
(setq SCA ANS)(prin1 SCA)
(initget (+ 1 2))
(setq SCC (getdist " * ? "))(terpri)
(setq ANS (* ANS SCC))(prin1 SCA)(prompt" * ")(prin1 SCC)(prompt" = ")
(prin1 ANS)(terpri)
)
)
(if (or (= SCF "Divide")(= SCF "/"))(progn
(setq SCA ANS)(prin1 SCA)
(initget (+ 1 2))
(setq SCC (getdist " / ? "))(terpri)
(setq ANS (/ ANS SCC))(prin1 SCA)(prompt" / ")(prin1 SCC)(prompt" = ")
(prin1 ANS)(terpri)
)
)
(if (and (> ANS 0) (= SCF "SQuareroot"))(progn
(setq SCA ANS)
(setq ANS (sqrt ANS ))(prompt"Squareroot of ")(prin1 SCA)(prompt" = ")
(prin1 ANS)(terpri)
)
)
))(princ)
)
;
; End FASTCALC.LSP